import request from '@/utils/request'
import {jsToFormData} from "@/api/jf/equipment";

export function add(data) {
}

export function del(ids) {
}

export function edit(data) {
  const formData = jsToFormData(data)
  // console.log("formData", formData)
  return request({
    url: 'api/v2/base/farm/farmBase/save',
    method: 'post',
    data: formData,
    headers: { 'Content-Type': 'multipart/form-data;boundary = ' + new Date().getTime() }
  })
}

export function getFarmDesc(farmId) {
  return request({
    url: 'api/v2/biz/public/getFarmDesc',
    method: 'get',
    params: {farmId},
  })
}

export function getFarmLogo() {
  return request({
    url: 'api/v2/biz/public/getLogo',
    method: 'get',
  })
}

export function getCompName() {
  return request({
    url: 'api/v2/biz/public/getCompName',
    method: 'get',
  })
}

export default { add, edit, del }
